import { create } from 'zustand';

type State = {
  simulations: any[]; // 仿真列表
};
type Action = {
  setSimulations: (simulations: State['simulations']) => void;
};

/**
 * 仿真列表数据，暂时只实时更新了name和uuid，后续看情况更新全部
 */
export const useSimulationsStore = create<State & Action>((set) => ({
  simulations: [],
  setSimulations: (simulations: State['simulations']) =>
    set(() => ({ simulations })),
}));
